package com.yao.springcloud;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.boot.context.properties.ConfigurationPropertiesBinding;
import org.springframework.stereotype.Component;

/**
 * 测试使用@Value注解注入被@Component修饰的类和没有被修饰过的属性的区别
 * 
 * @Description: TODO(用一句话描述该文件做什么)
 * @author yaoym
 * @date 2018年1月20日 下午6:30:56
 * @version V1.0
 */
@Component
@ConfigurationProperties()
public class PropertiesTest {

	@Value("${apiservice.miResource.url}")
	private String url;

	private String logger;

	public String getLogger() {
		return logger;
	}

	public void setLogger(String logger) {
		this.logger = logger;
	}

	public String getUrl() {
		return url;
	}

	public void setUrl(String url) {
		this.url = url;
	}

	@Override
	public String toString() {
		return "PropertiesTest [url=" + url + ", logger=" + logger + "]";
	}

}
